<?php
$this->layout='column1';

$this->pageTitle=Yii::app()->name . ' - Photo';
$this->breadcrumbs=array(
	'Photo',
);
?>
<h2>Photo Gallery</h2>


<div class="row-fluid">

              
	<?php 
	$data = ($dataProvider->getData()) ;
	for( $i = 0; $i < count($data); $i+=4 ) { ?>   
		<ul class="thumbnails">
		<?php for($j=0; $j<4;$j++) { 
			$k = $i + $j;
			if( $k < count($data)){
			?>
			<li class="span3">
                <div class="thumbnail">
		 				  <img  src="<?php echo Yii::app()->request->baseUrl.$data[$k]->photo; ?> ">
		                  <div class="caption">
		                    <h3><?php echo $data[$k]->title; ?></h3>
		                    <p> <?php echo $data[$k]->content; ?></p>
		                    <a class="btn btn-primary" href="<?php echo Yii::app()->request->baseUrl.$data[$k]->photo; ?> ">view pic</a>
		                    <a class="btn" href="<?php echo $data[$k]->getUrl(); ?> ">view post</a>
		                  </div>
				</div>
             </li>
	<?php }} ?> 
	 
	 </ul>
	<?php } ?>			
    
 </div>              

